﻿<Window x:Class="SMG.Presentation.WPessoa"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Cadastro de Contato" MinWidth="351" MinHeight="220" Width="351" Height="220"
        WindowStartupLocation="CenterScreen" Loaded="Window_Loaded">
    <Grid Margin="5">
        <Grid.RowDefinitions>
            <RowDefinition Height="auto"/>
            <RowDefinition Height="auto"/>
        </Grid.RowDefinitions>

        <Grid x:Name="gridForm" IsEnabled="False">
            <Grid.RowDefinitions>
                <RowDefinition Height="auto"/>
                <RowDefinition Height="auto"/>
                <RowDefinition Height="auto"/>
                <RowDefinition Height="auto"/>
                <RowDefinition Height="auto"/>
                <RowDefinition Height="auto"/>
                <RowDefinition Height="auto"/>
            </Grid.RowDefinitions>

            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="auto"/>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>

            <TextBlock Text="Nome :"/>
            <TextBox x:Name="txtNome" Grid.Column="1" HorizontalAlignment="Left" Margin="5,0,0,0" MaxLength="20" Width="160" Height="23"/>

            <TextBlock Text="Email :" Grid.Row="1"/>
            <TextBox x:Name="txtEmail" Grid.Row="1" Grid.Column="1" Margin="5,0,6,0"  MaxLength="40" Height="23"/>

            <TextBlock Text="Telefone :" Grid.Row="2"/>
            <TextBox x:Name="txtTelefone" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Left" MaxLength="9" Width="91" Height="23" Margin="5,0,0,0"/>

            <TextBlock Text="Celular :" Grid.Row="3"/>
            <TextBox x:Name="txtCelular" Grid.Row="3" Grid.Column="1" HorizontalAlignment="Left" MaxLength="9" Width="91" Height="23" Margin="5,0,0,0"/>

            <TextBlock Text="Nascimento :" Grid.Row="4"/>
            <DatePicker x:Name="dptNascimento" Grid.Row="4" Grid.Column="1" HorizontalAlignment="Left" Width="117" Height="23" Margin="5,0,0,0" DataContext="{Binding}" />

            <TextBlock Text="Grupo :" Grid.Row="5"/>
            <ComboBox x:Name="cboGrupo" Grid.Row="5" Grid.Column="1" DisplayMemberPath="Nome" SelectedValuePath="Codigo" HorizontalAlignment="Left" Width="150" Height="23" Margin="5,0,0,0"/>
        </Grid>

        <StackPanel Orientation="Horizontal" Grid.Row="1" HorizontalAlignment="Right">
            <Button x:Name="btnNovo" Content="Novo" Height="30" VerticalAlignment="Top" Margin="3" Click="btnNovo_Click"/>
            <Button x:Name="btnAlterar" Visibility="Collapsed"  Content="Alterar" Height="30" VerticalAlignment="Top" Margin="3" Click="btnAlterar_Click"/>
            <Button x:Name="btnSalvar" Visibility="Collapsed" Content="Salvar" Height="30" VerticalAlignment="Top" Margin="3" Click="btnSalvar_Click"/>
            <Button x:Name="btnConsultar" Content="Consultar" Height="30" VerticalAlignment="Top" Margin="3" Click="btnConsultar_Click" />
            <Button x:Name="btnExcluir" Visibility="Collapsed" Content="Excluir" Height="30" VerticalAlignment="Top" Margin="3" Click="btnExcluir_Click"/>
            <Button x:Name="btnCancelar" Visibility="Collapsed" Content="Cancelar" Height="30" VerticalAlignment="Top" Margin="3" Click="btnCancelar_Click"/>
            <Button x:Name="btnSair" Content="Sair" Height="30" VerticalAlignment="Top" Margin="3" Click="btnSair_Click"/>
        </StackPanel>
    </Grid>
</Window>
